// 测试配置文件是否能正常加载
try {
  const config = require('./config');
  console.log('✅ 配置文件加载成功');
  console.log('存储路径:', config.storage.path);
  console.log('服务器配置:', config.server);
  
  // 测试multer配置
  console.log('✅ Multer配置检查:');
  console.log('- destination函数存在:', typeof config.upload.destination === 'function');
  console.log('- filename函数存在:', typeof config.upload.filename === 'function');
  
} catch (error) {
  console.error('❌ 配置文件加载失败:', error.message);
  process.exit(1);
}

// 测试控制器文件
try {
  const UploadController = require('./controllers/uploadController');
  console.log('✅ 上传控制器加载成功');
  console.log('- getUploadMiddleware方法存在:', typeof UploadController.getUploadMiddleware === 'function');
  console.log('- uploadFiles方法存在:', typeof UploadController.uploadFiles === 'function');
} catch (error) {
  console.error('❌ 上传控制器加载失败:', error.message);
  process.exit(1);
}

console.log('🎉 所有配置检查通过！'); 